/*
 * test_new_handlers.cpp
 *
 *  Created on: Oct 28, 2012
 *      Author: Federico Orquera
 */

#include "newMockFile.h"

int main(){

	newMockFile testMockFile("NotAFile.bpt");

	node_ptr testPtr1, testPtr2, testPtr3;

	testPtr1 = testMockFile.getNewNode(0);
	testMockFile.saveNode(testPtr1);
	testPtr2 = testMockFile.getNewNode(1);
	testMockFile.saveNode(testPtr2);
	testPtr3 = testMockFile.getNode(testPtr1->getNodeID());

	cout<<"Testeando Nodes"<<endl;
	cout<<"Node 1"<<endl;
	cout<<"\t getLevel() "	<<((testPtr1->getLevel() == 0)? "OK":"FAIL")<<endl;
	cout<<"\t getOrder() "	<<((testPtr1->getOrder() == ORDER)?"OK":"FAIL")<<endl;
	cout<<"Node 2"<<endl;
	cout<<"\t getLevel() "	<<((testPtr2->getLevel() == 1)? "OK":"FAIL")<<endl;
	cout<<"\t getOrder() "	<<((testPtr2->getOrder() == ORDER)?"OK":"FAIL")<<endl;
	cout<<endl<<"\t getNodeID("<<testPtr1->getNodeID()<<") "	<<((testPtr3->getNodeID() == testPtr1->getNodeID())? "OK":"FAIL")<<endl<<endl;

	return 0;

}
